<template>
  <div class="app-container">

    <header class="header">
      <div class="header_left">
        <div class="breadcrumb">
          <span>
            <a>ai对话</a>
          </span>
        </div>
      </div>
    </header>

    <div style="height: 20px"></div>

        <template>
          <el-col :span="4">
            <el-card v-for="item in list" shadow="hover" style="cursor: pointer;width: 200px;color: #409EFF;">
              <div @click="toDetail(item.id)" >{{ item.name }}\{{ item.id }}</div>
            </el-card>
          </el-col>
        </template>

    <div class="diaBox">
      <diaLogBox :id="id"></diaLogBox>
    </div>

  </div>
</template>

<script>

import userInfo from "@/views/mine/components/userInfo";
import resetPwd from "@/views/mine/components/resetPwd";
import {getInfo} from "@/api/user";
import {getAIList} from "@/api/ai";
import diaLogBox from "@/views/AIMessage/diaLogBox";

export default {
  components: {
    userInfo, resetPwd,diaLogBox
  },
  data() {
    return {
      list: [],
      id:null
    }
  },
  created() {
    this.getList()
  },
  methods: {
    getList() {
      getAIList().then(response => {
        this.list = response.data
        console.log(this.list)
      })
    },
    toDetail(id) {
      console.log(id)
      this.id=id
      // this.$router.push({ path: "/announce/announce" });
    },
  }
}
</script>

<style lang="scss" scoped>
.app-container {
  padding: 10px 30px;

}
.diaBox{
  padding-left: 270px;

}
.breadcrumb {
  height: 40px;
  font-size: 18px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: rgb(37, 38, 43);
}
.header {
  display: flex;
  justify-content: space-between;

  .header_left {
    display: flex;
    justify-content: center;
    align-items: center;
  }}
</style>
